home *** CD-ROM | disk | FTP | other *** search
- Define DateTime;
- DateTime := [date];
-
- Define OnlyDate;
- Define OnlyTime;
-
- //The Date command returns the date in the following format: DD.MM.YYYY, HH:MM
- //So, lets copy the data from it. First, the actual time from the end:
- OnlyTime := [sCopy 12 100 $DateTime];
-
-
- Define Month;
- Define MonthNum;
-
- //And then the current month's number
- MonthNum := [sCopy 4 2 $DateTime];
-
- //This is such a cool script it even translates the numerical date information to plain English
- If ($MonthNum = 01) [ Month := "January"; ]
- If ($MonthNum = 02) [ Month := "February"; ]
- If ($MonthNum = 03) [ Month := "March"; ]
- If ($MonthNum = 04) [ Month := "April"; ]
- If ($MonthNum = 05) [ Month := "May"; ]
- If ($MonthNum = 06) [ Month := "June"; ]
- If ($MonthNum = 07) [ Month := "July"; ]
- If ($MonthNum = 08) [ Month := "August"; ]
- If ($MonthNum = 09) [ Month := "September"; ]
- If ($MonthNum = 10) [ Month := "October"; ]
- If ($MonthNum = 11) [ Month := "November"; ]
- If ($MonthNum = 12) [ Month := "December"; ]
-
- Define Day;
- Define DayNum;
-
- //And finally, lets copy the current day's number
- DayNum := [sCopy 1 2 $DateTime];
-
- //1st
- //2nd
- //3rd
- //4th
- //5th
- //6th
- //..
-
- //And lets also translate it to English
- If ($DayNum = 01) [Day := "1st";]
- If ($DayNum = 02) [Day := "2nd";]
- If ($DayNum = 03) [Day := "3rd";]
-
- //And all the rest follows the pattern DayNum + "th", so:
- If ($DayNum > 03) [Day := [CombVar DayNum th]; ]
-
-
- ShowMessage The clock is $OnlyTime and today is the $Day of $Month.;